
export default async function(query,variables={}){
    console.log(query,variables)
    const res = await fetch("/graphql", {
        method: "POST",
        headers: {
            "Content-Type": "application/json",
            "Accept": "application/json",
        },
        
        body: JSON.stringify({
            query,
            variables
        })
    });
    return await res.json();
}

